package com.easy.mapper;

import com.easy.bean.Fruit;
import com.easy.util.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FruitMapper {
    int add(@Param("fruit") Fruit fruit);
    int edit(@Param("fruit") Fruit fruit);
    int del(@Param("id") Integer id);
    Fruit one(@Param("id") Integer id);
    List<Fruit> all(@Param("fruit") Fruit fruit);

    int pageCount(@Param("fruit") Fruit fruit);

    List<Fruit> page(@Param("page") Page page,@Param("fruit") Fruit fruit);

    // 新增：更新图片 URL
    int updateImageUrl(@Param("fruitId") Integer fruitId, @Param("imgUrl") String imgUrl);  // 更新水果图片 URL
}
